<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="performReservation.SMMDBBean"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.Vector"%>
<%!

	Vector<String[]> pers = null;
	Vector<String[]> cins = null;
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
	
</head>
<%
	//get all performance number&name 
	SMMDBBean pProcess = SMMDBBean.getInstance();
	pers = pProcess.getAllPerformDetail();
	cins = pProcess.getAllCinema();
%>

<body>
	<CENTER><FONT SIZE="30" COLOR="#000033"></FONT>Add sales</CENTER>
	<form method="post" action="addSalePro.jsp"/>
		<table width="300" border="1" cellspacing="0" cellpadding="0" bgcolor="white" align="center">
				<tr>
					<td  width="120" bgcolor="white" align="center" >Sale time:</td>
					<td  width="200">
					<input type="text" size="27" maxlength="30" name="time"></td>
				</tr>
				<tr>
					<td  width="120" bgcolor="white" align="center" >sale seats:</td>
					<td  width="200">
					<input type="text" size="27" maxlength="30" name="vacancy"></td>
				</tr>
				<tr>
					<td  width="120" bgcolor="white" align="center" >Price:</td>
					<td  width="200">
					<input type="text" size="27" maxlength="30" name="price"></td>
				</tr>
				<tr>
					<td  width="120" bgcolor="white" align="center" >Cinema:</td>
					<td  width="200">
					<SELECT NAME="cinema">
						<%
							if(cins!=null){
								for(int i = 0 ; i < cins.size(); i++ ){
									String[] cinema = new String[5];
									cinema = cins.get(i);
									%>
										<OPTION VALUE="<%=cinema[0] %>"><%=cinema[1] %></option>
									<%
								}
							}
						%>
						
						
					</SELECT>
					</td>
				</tr>
				<tr>
					<td  width="120" bgcolor="white" align="center" >Performance:</td>
					<td  width="200">
					<SELECT NAME="performance">
							<%
							if(pers!=null){
								for(int i = 0 ; i < pers.size(); i++ ){
									String[] perform = new String[7];
									perform = pers.get(i);
									%>
										<OPTION VALUE="<%=perform[0] %>"><%=perform[1] %></option>
									<%
								}
							}
						%>
						
					</SELECT>
					</td>
				</tr>	
					
				
				
			</table>
			<table width="300" border="1" cellspacing="0" cellpadding="0" bgcolor="white" align="center">
				<tr>
					<td width="300" align="center">
					<input type="submit" value="Submit"> <input type="reset" value="cancle">
					</td>
			</table>
	</form> 
</body>
</html>